<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <h2>这是一个桌面app</h2>
    <el-button type="primary" @click="pingPongHandler">click me</el-button>
    <hr>
    <div>
      node:{{ node }}
    </div>
    <div>
      chrome:{{ chrome }}
    </div>
    <div>
      electron:{{ electron }}
    </div>
  </div>
</template>

<script>
export default {
  name: 'App',
  components: {
  },
  created(){
    console.log(window.versions,'version')
  },
  computed:{
    node(){
      return window.versions.node()
    },
    chrome(){
      return window.versions.chrome()
    },
    electron(){
      return window.versions.electron()
    }
  },
  methods:{
    pingPongHandler(){
      window.versions.ping()
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
